//
//  HMCustomCartTableViewCell.m
//  HMMarket
//
//  Created by maimaigo3 on 2017/5/9.
//  Copyright © 2017年 homai. All rights reserved.
//

#import "HMCustomCartTableViewCell.h"
#import "CartModel.h"
@interface HMCustomCartTableViewCell ()

@property (weak, nonatomic) IBOutlet UIImageView *titleImageVI;
@property (weak, nonatomic) IBOutlet UILabel *productNameLabel;
@property (weak, nonatomic) IBOutlet UILabel *priceLabel;
@property (weak, nonatomic) IBOutlet UILabel *countLabel;

@end

@implementation HMCustomCartTableViewCell

- (void)awakeFromNib {
    [super awakeFromNib];
    self.selectionStyle = UITableViewCellSelectionStyleNone;
    // Initialization code
}

- (void)setCartModel:(CartModel *)cartModel {
    _productNameLabel.text = cartModel.item_name;
    _priceLabel.text = [NSString stringWithFormat:@"¥%@", cartModel.item_price];
    _countLabel.text = [NSString stringWithFormat:@"x%@", cartModel.item_number];
    NSString * imgStr = [NSString stringWithFormat:@"%@%@",kImageUrl,cartModel.sm_logo];
    [_titleImageVI sd_setImageWithURL:[NSURL URLWithString:imgStr] placeholderImage:[UIImage imageNamed:@"Cart_placeholder"] options:SDWebImageRetryFailed|SDWebImageLowPriority];

}

@end
